/**
 * 
获得组织架构数据
 * 
 */
import request from "@/utils/request" 

export function getzuzhi() {
    return request({
        url:'/company/department'
    })
}

//封装删除部门的接口
export function delzuzhi(id) {
    return request({
        url: `/company/department/${id}`,
        method: 'delete'
    })
}

//封装添加部门接口
export function addDepts(data) {
    return request({
        url: '/company/department',
        method: 'post',
        data
    })
}

//封装获取员工简单列表
export function getEmpSimpleList() {
    return request({
        url:'/sys/user/simple'
    })
}

//根据部门id获取详情
export function getDeptsDetaill(id){
    return request({
        url:`/company/department/${id}`
    })
}

//根据id修改部门
export function editDepts(data) {
    return require({
        url: ` /company/department/${data.id}`,
        method: 'put',
        data
    })
}